﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            Dog dog1 = new Dog();
            Dog dog2 = new Dog();
            while (dog1.IsAlive)
            {
                Console.WriteLine(dog1.HP);
                double distance = (new Random().NextDouble()) * 20;
                AttackResult attack = dog2.Attack(distance);
                dog1.Attacked(attack);
                Console.WriteLine(string.Format("distance:{0}\r\nattackValue:{1}\r\nHP:{2}", distance.ToString(), attack.AttackValue.ToString(), dog1.HP.ToString()));
            }

            Console.ReadLine();
        }
    }
}
